package com.edu.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

public class User extends Object {

    private int userId;

    private String username;

    private String password;

    public int age;

    public String sex;

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }


    public void sayHi(){
        System.out.println("你好 今天是周三");
    }


    public void sayHi(String sth){
        System.out.println("你好"+sth);
    }

    public void sayHi(int num,String sth){
        System.out.println(this.username +":"+num+sth);
    }

    private double makeNum(){

        return Math.random()*100;
    }

//    public String getUsername() {
//        return username;
//    }

    public void setUsername(String username) {
        this.username = username;
    }

    private void innerMethod(){
        System.out.println("执行了 一个私有方法");
    }


    public User() {

    }

    public User(int userId, String username, String password) {
        this.userId = userId;
        this.username = username;
        this.password = password;
    }

    private User(int userId){
        this.userId = userId;
    }


    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
}
